<template>
    <!-- 复杂表头 -->
    <div>
        <!-- 复杂表头加一列防止列错位，设置width为-1 -->
      <el-table-column class="my-column" width="-1" ></el-table-column>
      <el-table-column v-for="(propItem,index) in propList" :key="index" v-bind="propItem" align="center">
        <template v-if="propItem.fzCol">
            <!-- 调用本身（elCol组件） -->
          <elCol :propList="propItem.colList"></elCol>
        </template>
        <template v-if="!propItem.fzCol" #default="scope">
          <slot :name="propItem.slotName" :row="scope.row" :index="scope.$index">
            {{ scope.row[propItem.prop] }}
          </slot>
        </template>
      </el-table-column>
    </div>
  </template>
    
  <script>
  export default {
    name: "elCol",
    props: {
      propList: {
        type: Array,
        required: true
      },
    },
  };
  </script>
  